package pustakahidayah.online.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name="tb_transaksi_detail")
public class TransaksiDetail {
    @Id
    @Column(name="Id", length=10, nullable=false)
    private String Id;

    @ManyToOne
    @JoinColumn(name="IdBuku")
    private Buku buku;

    @Column(name="Quantity", length=10, nullable=false)
    private Integer Quantity;

    @ManyToOne
    @JoinColumn(name="IdTransaksi")
    private TransaksiHeader TransaksiHeader;


    public String getId() {
        return Id;
    }

    public void setId(String Id) {
        this.Id = Id;
    }

    public Integer getQuantity() {
        return Quantity;
    }

    public void setQuantity(Integer Quantity) {
        this.Quantity = Quantity;
    }

    public TransaksiHeader getTransaksiHeader() {
        return TransaksiHeader;
    }

    public void setTransaksiHeader(TransaksiHeader TransaksiHeader) {
        TransaksiHeader = TransaksiHeader;
    }

    public Buku getBuku() {
        return buku;
    }

    public void setBuku(Buku buku) {
        this.buku = buku;
    }
}
